#include "stc15f2k60s2.h"
#include "Tim.h"
#include "LED.h"
#include "Seg.h"
#include "stdio.h"
unsigned char pucSeg_Buf[9],pucSeg_Code[8],ucSeg_Pos;
unsigned long ulms;
unsigned char ucSec,ucLed;
void main(){
	Cls_Peripheral() ;
	Timer1Init();
	while(1){
		//sprintf(pucSeg_Buf,"%04u",(unsigned int )ucSec);
		Seg_Tran(pucSeg_Buf,pucSeg_Code);
}
}
void Time_1(void) interrupt 3 //定时器1中断函数
{ 
 ulms++; 
 if(!(ulms % 1000)) 
 { 
	ucSec++; 
	 ucLed++;
	Led_Disp(ucLed); 
 } 
 Seg_Disp(pucSeg_Code, ucSeg_Pos) ;
 if(++ucSeg_Pos>=8)   ucSeg_Pos=0;
} 